import { Rect, Size, Vec2, Vec3 } from "cc";

export namespace myUtils {
    //基于中心锚点且不计算缩放和旋转的包围盒
    export function getBoundingBox(pos: Vec2|Vec3, size: Size|Vec2, out?: Rect) {
        out = out || new Rect()
        return out.set(pos.x - size.x / 2, pos.y - size.y / 2, size.x, size.y)
    }
}